![]() |
OpenPoly |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Begins defining a polygon.
PolyHandle OpenPoly ();
A handle to a new polygon.
The OpenPoly function starts saving lines for processing as a polygon definition. While a polygon is open, all calls to the Line and LineTo functions affect the outline of the polygon. Only the line endpoints affect the polygon definition; the pattern mode, pattern, and size do not affect it. The OpenPoly function calls the HidePen function, so no drawing occurs on the screen while the polygon is open (unless you call the ShowPen function just after calling OpenPoly, or you called ShowPen previously without balancing it by a call to HidePen).
A polygon should consist of a sequence of connected lines. The OpenPoly function stores the definition for a polygon in a Polygon structure.
When a polygon is open, the current graphics port’s polySave field contains a handle to information related to the polygon definition. If you want to temporarily disable the polygon definition, you can save the current value of this field, set the field to NULL, and later restore the saved value to resume the polygon definition.
Even though the onscreen presentation of a polygon is clipped, the definition of a polygon is not; you can define a polygon anywhere on the coordinate plane.
When you are finished calling the line-drawing functions that define your polygon, use the ClosePoly function.
Do not call OpenPoly while a region or another polygon is already open.
Polygons are limited to 64 KB. You can determine the polygon size while it is being formed by calling the Memory Manager function GetHandleSize.
The OpenPoly function may move or purge memory blocks in the application heap; do not call this function at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)